﻿using HttpApiGateway;
using RpcHelper.Validate;
using Wedonek.RpcStore.Gateway.Interface;
using Wedonek.RpcStore.Gateway.Model;

namespace Wedonek.RpcStore.Gateway.Controller
{
    /// <summary>
    /// 服务节点链接状态
    /// </summary>
    internal class SignalStateController : ApiController
    {
        private readonly ISignalStateService _Service;

        public SignalStateController(ISignalStateService service)
        {
            this._Service = service;
        }
        /// <summary>
        /// 服务节点链接状态列表
        /// </summary>
        /// <param name="serverId"></param>
        /// <returns></returns>
        public SignalState[] Gets([NumValidate("rpc.server.id.error", 1)] long serverId)
        {
            return this._Service.Gets(serverId);
        }
    }
}
